# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-poppler-qt4
pkgver=0.24.0
pkgrel=2
pkgdesc='A Python 2 binding to poppler-qt.'
arch=('x86_64' 'aarch64')
url='https://github.com/wbsoft/python-poppler-qt4'
license=('LGPL')
depends=('python' 'python2-pyqt4' 'poppler-qt4')
source=("https://github.com/wbsoft/python-poppler-qt4/archive/v$pkgver.tar.gz")
conflicts=('python2-poppler-qt<=0.24.0')
sha512sums=('5f03e85f80f2ed4d560ee001a1c0394ddb2ccde504bf8564ceb700af27df8ed41de9fd60e058ce72e32d8ea37cb7706446f0793b25d8475803956653b82e593d')

build() {
  cd "python-poppler-qt4-$pkgver"

  python2 setup.py build_ext --qmake-bin=/usr/bin/qmake-qt4
}

package() {
  cd "python-poppler-qt4-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" \ 
  build_ext --qmake-bin=/usr/bin/qmake-qt4
}

